Skip to main content
Glama
page.tsx929 B
import { authViewPaths } from "@daveyplate/better-auth-ui/server" import { headers } from "next/headers" import { redirect } from "next/navigation" import { auth } from "@/lib/auth" import { AuthView } from "./view" export const dynamic = "force-dynamic"; export function generateStaticParams() { return Object.values(authViewPaths).map((pathname) => ({ pathname })) } export default async function AuthPage({ params }: { params: Promise<{ pathname: string }> }) { const { pathname } = await params // **EXAMPLE** SSR route protection for /auth/settings // NOTE: This opts /auth/settings out of static rendering // It already handles client side protection via useAuthenticate if (pathname === "settings") { const sessionData = await auth.api.getSession({ headers: await headers() }) if (!sessionData) redirect("/auth/sign-in?redirectTo=/auth/settings") } return <AuthView pathname={pathname} /> }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/metacode0602/open-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server